package gwtool.gui.dataSetTable.cellRenderer;

import java.awt.Color;
import java.awt.Component;

import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

public class DataSetCellRenderer implements TableCellRenderer {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private TableCellRenderer renderer;

	public DataSetCellRenderer(TableCellRenderer renderer) {
		this.renderer = renderer;
	}

	@Override
	public Component getTableCellRendererComponent(JTable table, Object o, boolean isSelected, boolean hasFocus, int row,
			int column) {

		Component c = renderer.getTableCellRendererComponent(table, o, isSelected, hasFocus, row, column);

		String s = o.toString();

		c.setForeground(Color.BLACK);

		((JComponent) c).setToolTipText(s);
		return c;
	}
}
